package com.sync.storage.service.student.impl;

import com.sync.storage.bean.Student;
import com.sync.storage.mapper.StudentMapper;
import com.sync.storage.service.student.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class StudentServiceImpl implements IStudentService {

    @Autowired(required = false)
    private StudentMapper studentMapper;

    @Override
    public int deleteByPrimaryKey(String name) {
        return studentMapper.deleteByPrimaryKey(name);
    }

    @Override
    public Student selectByPrimaryKey(String name) {
        return studentMapper.selectByPrimaryKey(name);
    }

    @Transactional
    @Override
    public int insert(Student record) {
        return studentMapper.insert(record);
    }

    @Transactional
    @Override
    public int insertSelective(Student record) {
        return insertSelective(record);
    }
}
